package com.jingsheng.jingshengcity.mvp.ui.adapter;

import com.chad.library.adapter.base.BaseMultiItemQuickAdapter;
import com.jingsheng.jingshengcity.R;
import com.jingsheng.jingshengcity.mvp.model.entity.BankCardEntity;
import com.jingsheng.jingshengcity.mvp.ui.holder.MyViewHolder;

import java.util.List;

/**
 * Created by Administrator on 2017/5/13.
 */

public class BankCardActivityAdapter extends BaseMultiItemQuickAdapter<BankCardEntity, MyViewHolder> {

    /**
     * Same as QuickAdapter#QuickAdapter(Context,int) but with
     * some initialization data.
     *
     * @param data A new list is created out of this one to avoid mutable list
     */
    public BankCardActivityAdapter(List<BankCardEntity> data) {
        super(data);
        addItemType(BankCardEntity.ITEM, R.layout.adapter_bank_card_item);
        addItemType(BankCardEntity.ADD, R.layout.adapter_bank_card_add);
    }

    @Override
    protected void convert(MyViewHolder helper, BankCardEntity item) {
        switch (helper.getItemViewType()) {
            case BankCardEntity.ITEM:
                break;
            case BankCardEntity.ADD:
                helper.addOnClickListener(R.id.ll_add_item);
                break;
        }
    }
}
